package multithreading;

import java.util.concurrent.ArrayBlockingQueue;

public class DFCTesting {
    public static void main(String[] args) {
//        Foodie f = new Foodie();
//        Cook c = new Cook();
//        f.setName("艾斯比");
//        c.setName("拿铁");
//        f.start();
//        c.start();
        ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<>(1);
        FoodieB fb = new FoodieB(queue);
        CookB cb = new CookB(queue);
        fb.setName("艾斯比");
        cb.setName("拿铁");
        fb.start();
        cb.start();
    }
}
